# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

pkgname=sigutils
pkgver=0.3.0
pkgrel=2
pkgdesc='Small signal processing utility library'
arch=('loong64' 'x86_64')
url='https://github.com/BatchDrake/sigutils'
license=('GPL3')
depends=('libsndfile' 'fftw' 'libvolk')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('fbf6db639e324ac9e835dacc4b12ff35edb7345f9873a805cb18b4d79651dd1102bccf24ffdcad860a93a21baff19c4f59636fd0459cd2e2de7ffbb02d79ca53')

build() {
  mkdir $pkgname-$pkgver/build
  cd $pkgname-$pkgver/build

  export CFLAGS+=" ${CPPFLAGS}"
  export CXXFLAGS+=" ${CPPFLAGS}"

  cmake .. \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=None

  make
}

package() {
  cd $pkgname-$pkgver/build

  make DESTDIR="$pkgdir" install
}
